/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyetech.springstage.core.entity.AbstractEntity;
import javax.validation.constraints.NotEmpty;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * ClassName: DishesPackageDetail <br/>
 * Function: 套餐菜品明细 <br/>
 * date: 2018-11-23 13:43:39 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="dishes_package_details")
public class DishesPackageDetail extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 套餐id 
    @Column(name="pack_id")
	private Long packId = null;

	// 套餐组id
    @Column(name="group_id")
	private Long groupId = null;

	// 菜品id 
    @Column(name="dishes_id")
	private Long dishesId = null;

	// 规格id 
    @Column(name="spec_id")
	private Long specId = null;
	// 规格id
    @Column(name="spec_name")
	private String specName = null;


	// 差价 
    @Column(name="diff",scale=2)
	private Double diff = null;

	// 菜品数量 
    @Column(name="count",scale=2)
	private Double count = null;

	// 是否备选 
    @Column(name="alternative")
	private Boolean alternative = null;

	// 是否默认 
    @Column(name="def")
	private Boolean def = null;
	// 价格
	@Column(name="price")
	private Double price = 0.0;



	@Tolerate
	public DishesPackageDetail() {
		
	}
    @Tolerate
	public DishesPackageDetail(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取套餐id
	 */
	public Long getPackId() {
		return this.packId;
	}

    /**
     * 设置套餐id
     */
	public DishesPackageDetail setPackId(Long packId) {
		this.packId = packId;
		return this;
	}

	/**
	 * 获取套餐id
	 */
	public Long getGroupId() {
		return this.groupId;
	}

    /**
     * 设置套餐id
     */
	public DishesPackageDetail setGroupId(Long groupId) {
		this.groupId = groupId;
		return this;
	}

	/**
	 * 获取菜品id
	 */
	public Long getDishesId() {
		return this.dishesId;
	}

    /**
     * 设置菜品id
     */
	public DishesPackageDetail setDishesId(Long dishesId) {
		this.dishesId = dishesId;
		return this;
	}

	/**
	 * 获取规格id
	 */
	public Long getSpecId() {
		return this.specId;
	}

    /**
     * 设置规格id
     */
	public DishesPackageDetail setSpecId(Long specId) {
		this.specId = specId;
		return this;
	}

	/**
	 * 获取差价
	 */
	public Double getDiff() {
		return this.diff;
	}

    /**
     * 设置差价
     */
	public DishesPackageDetail setDiff(Double diff) {
		this.diff = diff;
		return this;
	}

	/**
	 * 获取菜品数量
	 */
	public Double getCount() {
		return this.count;
	}

    /**
     * 设置菜品数量
     */
	public DishesPackageDetail setCount(Double count) {
		this.count = count;
		return this;
	}

	/**
	 * 获取是否备选
	 */
	public Boolean getAlternative() {
		return this.alternative;
	}

    /**
     * 设置是否备选
     */
	public DishesPackageDetail setAlternative(Boolean alternative) {
		this.alternative = alternative;
		return this;
	}

	/**
	 * 获取是否默认
	 */
	public Boolean getDef() {
		return this.def;
	}

    /**
     * 设置是否默认
     */
	public DishesPackageDetail setDef(Boolean def) {
		this.def = def;
		return this;
	}

	public String getSpecName() {
		return specName;
	}

	public void setSpecName(String specName) {
		this.specName = specName;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
}
